<script setup>
const props = defineProps({
    cateList:Array
})

</script>


<template>
    <view class="content">
        <navigator
            url="/pages/index/index"
            v-for="(item,index) in cateList" :key="index"
            class="content-item"
        >  
        <image
            :src="item.icon"
            mode="scaleToFill"
            class="block"
        />
        <text class="text">{{ item.name }}</text>
        </navigator>
        
    </view>
  
</template>


<style lang="scss" scoped>
.content{
    display: flex;
    flex-wrap: wrap;
    margin: 20rpx 0 0;
    padding: 10rpx 0;
    height: 300rpx;
    .content-item{
        width: 150rpx;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        margin-bottom: 15rpx;


        .block{
            width: 100rpx;
            height: 100rpx;
        }
        .text{
            font-size: 26rpx;
            color: #666;
        }
    }
    
    
}

</style>